﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;

using IBApi;

namespace IBRx {
	public class FA : IBResponse { }

	public class ManagedAccounts : FA {
		public string AccountsList { get; private set; }

		[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
		public ManagedAccounts(string accountsList)  {
			this.AccountsList = accountsList;
		}
	}

	public class ReceiveFA : FA {
		public int FADataType { get; private set; }
		public string FAXmlData { get; private set; }

		[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
		public ReceiveFA(int faDataType, string faXmlData) {
			this.FADataType = faDataType;
			this.FAXmlData = faXmlData;
		}
	}

	public class AccountSummary : FA {
		public int ReqId { get; private set; }
		public string Account { get; private set; }
		public string Tag { get; private set; }
		public string Value { get; private set; }
		public string Currency { get; private set; }

		[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
		public AccountSummary(int reqId, string account, string tag, string value, string currency) {
			this.ReqId = ReqId;
			this.Account = account;
			this.Tag = tag;
			this.Value = value;
			this.Currency = currency;
		}
	}

	public class AccountSummaryEnd : FA {
		public int ReqId { get; private set; }

		[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
		public AccountSummaryEnd(int reqId) {
			this.ReqId = reqId;
		}
	}

	public class Position : FA {
		public string Account { get; private set; }
		public Contract Contract { get; private set; }
		public int Pos { get; private set; }

		[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
		public Position(string account, Contract contract, int pos) {
			this.Account = account;
			this.Contract = contract;
			this.Pos = pos;
		}
	}

	public class PositionEnd : FA { }
}
